<template>
  <div>
    <!-- 三级联动的全局组件 -->
    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <Recommend></Recommend>
    <Rank />
    <Like></Like>
    <Floor v-for="floor in floorsLists" :key="floor.id" :list="floor"> </Floor>

    <Brand />
  </div>
</template>
<script>
import ListContainer from '@/pages/Home/ListContainer'
import Recommend from '@/pages/Home/Recommend'
import Rank from '@/pages/Home/Rank'
import Like from '@/pages/Home/Like'
import Floor from '@/pages/Home/Floor'
import Brand from '@/pages/Home/Brand'
import { mapState } from 'vuex'

export default {
  name: 'Home',
  components: {
    ListContainer,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand,
  },
  mounted() {
    this.$store.dispatch('getFloorLists')

  },
  computed: {
    ...mapState({
      floorsLists: (state) => state.home.floorsLists,
    }),
  },
}
</script>
<style lang="less" scoped></style>
